// const webpack = require("webpack");
module.exports = {
  configureWebpack: {
    externals: {
      AMap: "AMap", // 高德地图配置
    },
  },
  css: {
    loaderOptions: {
      css: {},
      postcss: {
        plugins: [
          require("postcss-px2rem")({
            remUnit: 192, // 如果设计稿是1920 这里就是192
          }),
        ],
      },
    },
  },
  devServer: {
    proxy: {
      [process.env.VUE_APP_BASE_API]: {
        // target: "https://quality-testing.laihi.cc",
        target: "http://192.168.1.19:80",
        changeOrigin: true,
        pathRewrite: {
          ["^" + process.env.VUE_APP_BASE_API]: "",
        },
      },
    },
    //before: require('./mock/mock-server.js')
  },
};
